
package std.sync

import std.time.MonoTime
import std.time.DateTime

@Deprecated
@!APILevel[
    since: "22"
]
public enum MemoryOrder {
    @!APILevel[
        since: "22"
    ]
    SeqCst
}

@Deprecated
@!APILevel[
    since: "22"
]
public let DefaultMemoryOrder: MemoryOrder = MemoryOrder.SeqCst

@!APILevel[
    since: "22"
]
public class AtomicInt8 {
    @!APILevel[
        since: "22"
    ]
    public init(val: Int8)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func load(): Int8
    
    @Deprecated[message: "Use `public func load(): Int8` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func load(memoryOrder!: MemoryOrder): Int8
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func store(val: Int8): Unit
    
    @Frozen
    @Deprecated[message: "Use `public func store(val: Int8): Unit` instead."]
    @!APILevel[
        since: "22"
    ]
    public func store(val: Int8, memoryOrder!: MemoryOrder): Unit
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func swap(val: Int8): Int8
    
    @Frozen
    @Deprecated[message: "Use `public func swap(val: Int8): Int8` instead."]
    @!APILevel[
        since: "22"
    ]
    public func swap(val: Int8, memoryOrder!: MemoryOrder): Int8
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: Int8, new: Int8): Bool
    
    @Frozen
    @Deprecated[message: "Use `public func compareAndSwap(old: Int8, new: Int8): Bool` instead."]
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: Int8, new: Int8, successOrder!: MemoryOrder, failureOrder!: MemoryOrder): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAdd(val: Int8): Int8
    
    @Frozen
    @Deprecated[message: "Use `public func fetchAdd(val: Int8): Int8` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchAdd(val: Int8, memoryOrder!: MemoryOrder): Int8
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchSub(val: Int8): Int8
    
    @Frozen
    @Deprecated[message: "Use `public func fetchSub(val: Int8): Int8` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchSub(val: Int8, memoryOrder!: MemoryOrder): Int8
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAnd(val: Int8): Int8
    
    @Frozen
    @Deprecated[message: "Use `public func fetchAnd(val: Int8): Int8` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchAnd(val: Int8, memoryOrder!: MemoryOrder): Int8
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchOr(val: Int8): Int8
    
    @Frozen
    @Deprecated[message: "Use `public func fetchOr(val: Int8): Int8` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchOr(val: Int8, memoryOrder!: MemoryOrder): Int8
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchXor(val: Int8): Int8
    
    @Frozen
    @Deprecated[message: "Use `public func fetchXor(val: Int8): Int8` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchXor(val: Int8, memoryOrder!: MemoryOrder): Int8
}

@!APILevel[
    since: "22"
]
public class AtomicInt16 {
    @!APILevel[
        since: "22"
    ]
    public init(val: Int16)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func load(): Int16
    
    @Frozen
    @Deprecated[message: "Use `public func load(): Int16` instead."]
    @!APILevel[
        since: "22"
    ]
    public func load(memoryOrder!: MemoryOrder): Int16
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func store(val: Int16): Unit
    
    @Frozen
    @Deprecated[message: "Use `public func store(val: Int16): Unit` instead."]
    @!APILevel[
        since: "22"
    ]
    public func store(val: Int16, memoryOrder!: MemoryOrder): Unit
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func swap(val: Int16): Int16
    
    @Frozen
    @Deprecated[message: "Use `public func swap(val: Int16): Int16` instead."]
    @!APILevel[
        since: "22"
    ]
    public func swap(val: Int16, memoryOrder!: MemoryOrder): Int16
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: Int16, new: Int16): Bool
    
    @Frozen
    @Deprecated[message: "Use `public func compareAndSwap(old: Int16, new: Int16): Bool` instead."]
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: Int16, new: Int16, successOrder!: MemoryOrder, failureOrder!: MemoryOrder): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAdd(val: Int16): Int16
    
    @Frozen
    @Deprecated[message: "Use `public func fetchAdd(val: Int16): Int16` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchAdd(val: Int16, memoryOrder!: MemoryOrder): Int16
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchSub(val: Int16): Int16
    
    @Frozen
    @Deprecated[message: "Use `public func fetchSub(val: Int16): Int16` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchSub(val: Int16, memoryOrder!: MemoryOrder): Int16
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAnd(val: Int16): Int16
    
    @Frozen
    @Deprecated[message: "Use `public func fetchAnd(val: Int16): Int16` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchAnd(val: Int16, memoryOrder!: MemoryOrder): Int16
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchOr(val: Int16): Int16
    
    @Frozen
    @Deprecated[message: "Use `public func fetchOr(val: Int16): Int16` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchOr(val: Int16, memoryOrder!: MemoryOrder): Int16
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchXor(val: Int16): Int16
    
    @Frozen
    @Deprecated[message: "Use `public func fetchXor(val: Int16): Int16` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchXor(val: Int16, memoryOrder!: MemoryOrder): Int16
}

@!APILevel[
    since: "22"
]
public class AtomicInt32 {
    @!APILevel[
        since: "22"
    ]
    public init(val: Int32)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func load(): Int32
    
    @Frozen
    @Deprecated[message: "Use `public func load(): Int32` instead."]
    @!APILevel[
        since: "22"
    ]
    public func load(memoryOrder!: MemoryOrder): Int32
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func store(val: Int32): Unit
    
    @Frozen
    @Deprecated[message: "Use `public func store(val: Int32): Unit` instead."]
    @!APILevel[
        since: "22"
    ]
    public func store(val: Int32, memoryOrder!: MemoryOrder): Unit
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func swap(val: Int32): Int32
    
    @Frozen
    @Deprecated[message: "Use `public func swap(val: Int32): Int32` instead."]
    @!APILevel[
        since: "22"
    ]
    public func swap(val: Int32, memoryOrder!: MemoryOrder): Int32
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: Int32, new: Int32): Bool
    
    @Frozen
    @Deprecated[message: "Use `public func compareAndSwap(old: Int32, new: Int32): Bool` instead."]
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: Int32, new: Int32, successOrder!: MemoryOrder, failureOrder!: MemoryOrder): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAdd(val: Int32): Int32
    
    @Frozen
    @Deprecated[message: "Use `public func fetchAdd(val: Int32): Int32` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchAdd(val: Int32, memoryOrder!: MemoryOrder): Int32
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchSub(val: Int32): Int32
    
    @Frozen
    @Deprecated[message: "Use `public func fetchSub(val: Int32): Int32` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchSub(val: Int32, memoryOrder!: MemoryOrder): Int32
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAnd(val: Int32): Int32
    
    @Frozen
    @Deprecated[message: "Use `public func fetchAnd(val: Int32): Int32` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchAnd(val: Int32, memoryOrder!: MemoryOrder): Int32
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchOr(val: Int32): Int32
    
    @Frozen
    @Deprecated[message: "Use `public func fetchOr(val: Int32): Int32` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchOr(val: Int32, memoryOrder!: MemoryOrder): Int32
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchXor(val: Int32): Int32
    
    @Frozen
    @Deprecated[message: "Use `public func fetchXor(val: Int32): Int32` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchXor(val: Int32, memoryOrder!: MemoryOrder): Int32
}

@!APILevel[
    since: "22"
]
public class AtomicInt64 {
    @!APILevel[
        since: "22"
    ]
    public init(val: Int64)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func load(): Int64
    
    @Frozen
    @Deprecated[message: "Use `public func load(): Int64` instead."]
    @!APILevel[
        since: "22"
    ]
    public func load(memoryOrder!: MemoryOrder): Int64
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func store(val: Int64): Unit
    
    @Frozen
    @Deprecated[message: "Use `public func store(val: Int64): Unit` instead."]
    @!APILevel[
        since: "22"
    ]
    public func store(val: Int64, memoryOrder!: MemoryOrder): Unit
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func swap(val: Int64): Int64
    
    @Frozen
    @Deprecated[message: "Use `public func swap(val: Int64): Int64` instead."]
    @!APILevel[
        since: "22"
    ]
    public func swap(val: Int64, memoryOrder!: MemoryOrder): Int64
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: Int64, new: Int64): Bool
    
    @Frozen
    @Deprecated[message: "Use `public func compareAndSwap(old: Int64, new: Int64): Bool` instead."]
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: Int64, new: Int64, successOrder!: MemoryOrder, failureOrder!: MemoryOrder): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAdd(val: Int64): Int64
    
    @Frozen
    @Deprecated[message: "Use `public func fetchAdd(val: Int64): Int64` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchAdd(val: Int64, memoryOrder!: MemoryOrder): Int64
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchSub(val: Int64): Int64
    
    @Frozen
    @Deprecated[message: "Use `public func fetchSub(val: Int64): Int64` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchSub(val: Int64, memoryOrder!: MemoryOrder): Int64
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAnd(val: Int64): Int64
    
    @Frozen
    @Deprecated[message: "Use `public func fetchAnd(val: Int64): Int64` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchAnd(val: Int64, memoryOrder!: MemoryOrder): Int64
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchOr(val: Int64): Int64
    
    @Frozen
    @Deprecated[message: "Use `public func fetchOr(val: Int64): Int64` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchOr(val: Int64, memoryOrder!: MemoryOrder): Int64
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchXor(val: Int64): Int64
    
    @Frozen
    @Deprecated[message: "Use `public func fetchXor(val: Int64): Int64` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchXor(val: Int64, memoryOrder!: MemoryOrder): Int64
}

@!APILevel[
    since: "22"
]
public class AtomicUInt8 {
    @!APILevel[
        since: "22"
    ]
    public init(val: UInt8)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func load(): UInt8
    
    @Frozen
    @Deprecated[message: "Use `public func load(): UInt8` instead."]
    @!APILevel[
        since: "22"
    ]
    public func load(memoryOrder!: MemoryOrder): UInt8
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func store(val: UInt8): Unit
    
    @Frozen
    @Deprecated[message: "Use `public func store(val: UInt8): Unit` instead."]
    @!APILevel[
        since: "22"
    ]
    public func store(val: UInt8, memoryOrder!: MemoryOrder): Unit
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func swap(val: UInt8): UInt8
    
    @Frozen
    @Deprecated[message: "Use `public func swap(val: UInt8): UInt8` instead."]
    @!APILevel[
        since: "22"
    ]
    public func swap(val: UInt8, memoryOrder!: MemoryOrder): UInt8
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: UInt8, new: UInt8): Bool
    
    @Frozen
    @Deprecated[message: "Use `public func compareAndSwap(old: UInt8, new: UInt8): Bool` instead."]
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: UInt8, new: UInt8, successOrder!: MemoryOrder, failureOrder!: MemoryOrder): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAdd(val: UInt8): UInt8
    
    @Frozen
    @Deprecated[message: "Use `public func fetchAdd(val: UInt8): UInt8` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchAdd(val: UInt8, memoryOrder!: MemoryOrder): UInt8
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchSub(val: UInt8): UInt8
    
    @Frozen
    @Deprecated[message: "Use `public func fetchSub(val: UInt8): UInt8` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchSub(val: UInt8, memoryOrder!: MemoryOrder): UInt8
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAnd(val: UInt8): UInt8
    
    @Frozen
    @Deprecated[message: "Use `public func fetchAnd(val: UInt8): UInt8` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchAnd(val: UInt8, memoryOrder!: MemoryOrder): UInt8
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchOr(val: UInt8): UInt8
    
    @Frozen
    @Deprecated[message: "Use `public func fetchOr(val: UInt8): UInt8` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchOr(val: UInt8, memoryOrder!: MemoryOrder): UInt8
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchXor(val: UInt8): UInt8
    
    @Frozen
    @Deprecated[message: "Use `public func fetchXor(val: UInt8): UInt8` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchXor(val: UInt8, memoryOrder!: MemoryOrder): UInt8
}

@!APILevel[
    since: "22"
]
public class AtomicUInt16 {
    @!APILevel[
        since: "22"
    ]
    public init(val: UInt16)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func load(): UInt16
    
    @Frozen
    @Deprecated[message: "Use `public func load(): UInt16` instead."]
    @!APILevel[
        since: "22"
    ]
    public func load(memoryOrder!: MemoryOrder): UInt16
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func store(val: UInt16): Unit
    
    @Frozen
    @Deprecated[message: "Use `public func store(val: UInt16): Unit` instead."]
    @!APILevel[
        since: "22"
    ]
    public func store(val: UInt16, memoryOrder!: MemoryOrder): Unit
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func swap(val: UInt16): UInt16
    
    @Frozen
    @Deprecated[message: "Use `public func swap(val: UInt16): UInt16` instead."]
    @!APILevel[
        since: "22"
    ]
    public func swap(val: UInt16, memoryOrder!: MemoryOrder): UInt16
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: UInt16, new: UInt16): Bool
    
    @Frozen
    @Deprecated[message: "Use `public func compareAndSwap(old: UInt16, new: UInt16): Bool` instead."]
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: UInt16, new: UInt16, successOrder!: MemoryOrder, failureOrder!: MemoryOrder): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAdd(val: UInt16): UInt16
    
    @Frozen
    @Deprecated[message: "Use `public func fetchAdd(val: UInt16): UInt16` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchAdd(val: UInt16, memoryOrder!: MemoryOrder): UInt16
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchSub(val: UInt16): UInt16
    
    @Frozen
    @Deprecated[message: "Use `public func fetchSub(val: UInt16): UInt16` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchSub(val: UInt16, memoryOrder!: MemoryOrder): UInt16
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAnd(val: UInt16): UInt16
    
    @Frozen
    @Deprecated[message: "Use `public func fetchAnd(val: UInt16): UInt16` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchAnd(val: UInt16, memoryOrder!: MemoryOrder): UInt16
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchOr(val: UInt16): UInt16
    
    @Frozen
    @Deprecated[message: "Use `public func fetchOr(val: UInt16): UInt16` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchOr(val: UInt16, memoryOrder!: MemoryOrder): UInt16
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchXor(val: UInt16): UInt16
    
    @Frozen
    @Deprecated[message: "Use `public func fetchXor(val: UInt16): UInt16` instead."]
    @!APILevel[
        since: "22"
    ]
    public func fetchXor(val: UInt16, memoryOrder!: MemoryOrder): UInt16
}

@!APILevel[
    since: "22"
]
public class AtomicUInt32 {
    @!APILevel[
        since: "22"
    ]
    public init(val: UInt32)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func load(): UInt32
    
    @Deprecated[message: "Use `public func load(): UInt32` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func load(memoryOrder!: MemoryOrder): UInt32
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func store(val: UInt32): Unit
    
    @Deprecated[message: "Use `public func store(val: UInt32): Unit` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func store(val: UInt32, memoryOrder!: MemoryOrder): Unit
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func swap(val: UInt32): UInt32
    
    @Deprecated[message: "Use `public func swap(val: UInt32): UInt32` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func swap(val: UInt32, memoryOrder!: MemoryOrder): UInt32
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: UInt32, new: UInt32): Bool
    
    @Deprecated[message: "Use `public func compareAndSwap(old: UInt32, new: UInt32): Bool` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: UInt32, new: UInt32, successOrder!: MemoryOrder, failureOrder!: MemoryOrder): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAdd(val: UInt32): UInt32
    
    @Deprecated[message: "Use `public func fetchAdd(val: UInt32): UInt32` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAdd(val: UInt32, memoryOrder!: MemoryOrder): UInt32
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchSub(val: UInt32): UInt32
    
    @Deprecated[message: "Use `public func fetchSub(val: UInt32): UInt32` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchSub(val: UInt32, memoryOrder!: MemoryOrder): UInt32
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAnd(val: UInt32): UInt32
    
    @Deprecated[message: "Use `public func fetchAnd(val: UInt32): UInt32` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAnd(val: UInt32, memoryOrder!: MemoryOrder): UInt32
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchOr(val: UInt32): UInt32
    
    @Deprecated[message: "Use `public func fetchOr(val: UInt32): UInt32` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchOr(val: UInt32, memoryOrder!: MemoryOrder): UInt32
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchXor(val: UInt32): UInt32
    
    @Deprecated[message: "Use `public func fetchXor(val: UInt32): UInt32` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchXor(val: UInt32, memoryOrder!: MemoryOrder): UInt32
}

@!APILevel[
    since: "22"
]
public class AtomicUInt64 {
    @!APILevel[
        since: "22"
    ]
    public init(val: UInt64)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func load(): UInt64
    
    @Deprecated[message: "Use `public func load(): UInt64` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func load(memoryOrder!: MemoryOrder): UInt64
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func store(val: UInt64): Unit
    
    @Deprecated[message: "Use `public func store(val: UInt64): Unit` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func store(val: UInt64, memoryOrder!: MemoryOrder): Unit
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func swap(val: UInt64): UInt64
    
    @Deprecated[message: "Use `public func swap(val: UInt64): UInt64` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func swap(val: UInt64, memoryOrder!: MemoryOrder): UInt64
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: UInt64, new: UInt64): Bool
    
    @Deprecated[message: "Use `public func compareAndSwap(old: UInt64, new: UInt64): Bool` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: UInt64, new: UInt64, successOrder!: MemoryOrder, failureOrder!: MemoryOrder): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAdd(val: UInt64): UInt64
    
    @Deprecated[message: "Use `public func fetchAdd(val: UInt64): UInt64` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAdd(val: UInt64, memoryOrder!: MemoryOrder): UInt64
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchSub(val: UInt64): UInt64
    
    @Deprecated[message: "Use `public func fetchSub(val: UInt64): UInt64` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchSub(val: UInt64, memoryOrder!: MemoryOrder): UInt64
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAnd(val: UInt64): UInt64
    
    @Deprecated[message: "Use `public func fetchAnd(val: UInt64): UInt64` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchAnd(val: UInt64, memoryOrder!: MemoryOrder): UInt64
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchOr(val: UInt64): UInt64
    
    @Deprecated[message: "Use `public func fetchOr(val: UInt64): UInt64` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchOr(val: UInt64, memoryOrder!: MemoryOrder): UInt64
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchXor(val: UInt64): UInt64
    
    @Deprecated[message: "Use `public func fetchXor(val: UInt64): UInt64` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fetchXor(val: UInt64, memoryOrder!: MemoryOrder): UInt64
}

@!APILevel[
    since: "22"
]
public class AtomicBool {
    @!APILevel[
        since: "22"
    ]
    public init(val: Bool)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func load(): Bool
    
    @Deprecated[message: "Use `public func load(): Bool` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func load(memoryOrder!: MemoryOrder): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func store(val: Bool): Unit
    
    @Deprecated[message: "Use `public func store(val: Bool): Unit` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func store(val: Bool, memoryOrder!: MemoryOrder): Unit
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func swap(val: Bool): Bool
    
    @Deprecated[message: "Use `public func swap(val: Bool): Bool` instead."]
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func swap(val: Bool, memoryOrder!: MemoryOrder): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: Bool, new: Bool): Bool
    
    @Frozen
    @Deprecated[message: "Use `public func compareAndSwap(old: Bool, new: Bool): Bool` instead."]
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: Bool, new: Bool, successOrder!: MemoryOrder, failureOrder!: MemoryOrder): Bool
}

@!APILevel[
    since: "22"
]
public class AtomicReference<T> where T <: Object {
    @!APILevel[
        since: "22"
    ]
    public init(val: T)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func load(): T
    
    @Frozen
    @Deprecated[message: "Use `public func load(): T` instead."]
    @!APILevel[
        since: "22"
    ]
    public func load(memoryOrder!: MemoryOrder): T
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func store(val: T): Unit
    
    @Frozen
    @Deprecated[message: "Use `public func store(val: T): Unit` instead."]
    @!APILevel[
        since: "22"
    ]
    public func store(val: T, memoryOrder!: MemoryOrder): Unit
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func swap(val: T): T
    
    @Frozen
    @Deprecated[message: "Use `public func swap(val: T): T` instead."]
    @!APILevel[
        since: "22"
    ]
    public func swap(val: T, memoryOrder!: MemoryOrder): T
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: T, new: T): Bool
    
    @Frozen
    @Deprecated[message: "Use `public func compareAndSwap(old: T, new: T): Bool` instead."]
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: T, new: T, successOrder!: MemoryOrder, failureOrder!: MemoryOrder): Bool
}

@!APILevel[
    since: "22"
]
public class AtomicOptionReference<T> where T <: Object {
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public init(val: Option<T>)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func load(): Option<T>
    
    @Frozen
    @Deprecated[message: "Use `public func load(): Option<T>` instead."]
    @!APILevel[
        since: "22"
    ]
    public func load(memoryOrder!: MemoryOrder): Option<T>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func store(val: Option<T>): Unit
    
    @Frozen
    @Deprecated[message: "Use `public func store(val: Option<T>): Unit` instead."]
    @!APILevel[
        since: "22"
    ]
    public func store(val: Option<T>, memoryOrder!: MemoryOrder): Unit
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func swap(val: Option<T>): Option<T>
    
    @Frozen
    @Deprecated[message: "Use `public func swap(val: Option<T>): Option<T>` instead."]
    @!APILevel[
        since: "22"
    ]
    public func swap(val: Option<T>, memoryOrder!: MemoryOrder): Option<T>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(old: Option<T>, new: Option<T>): Bool
    
    @Frozen
    @Deprecated[message: "Use `public func compareAndSwap(old: Option<T>, new: Option<T>): Bool` instead."]
    @!APILevel[
        since: "22"
    ]
    public func compareAndSwap(
        old: Option<T>,
        new: Option<T>,
        successOrder!: MemoryOrder,
        failureOrder!: MemoryOrder
    ): Bool
}

@!APILevel[
    since: "22"
]
public class Barrier {
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public init(count: Int64)
    
    /**
    * @throws IllegalArgumentException
    * @throws ArithmeticException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func wait(timeout!: Duration = Duration.Max): Unit
}

@Deprecated[message: "Use `public interface Lock` instead."]
@!APILevel[
    since: "22"
]
public interface IReentrantMutex {
    @!APILevel[
        since: "22"
    ]
    func lock(): Unit
    
    @!APILevel[
        since: "22"
    ]
    func tryLock(): Bool
    
    @!APILevel[
        since: "22"
    ]
    func unlock(): Unit
}

@!APILevel[
    since: "22"
]
public class IllegalSynchronizationStateException <: Exception {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

@!APILevel[
    since: "22"
]
public interface Lock {
    @!APILevel[
        since: "22"
    ]
    func lock(): Unit
    
    @!APILevel[
        since: "22"
    ]
    func tryLock(): Bool
    
    @!APILevel[
        since: "22"
    ]
    func unlock(): Unit
}

@!APILevel[
    since: "22"
]
public interface UniqueLock <: Lock {
    @!APILevel[
        since: "22"
    ]
    func condition(): Condition
}

@!APILevel[
    since: "22"
]
public interface Condition {
    @!APILevel[
        since: "22"
    ]
    func wait(): Unit
    
    @!APILevel[
        since: "22"
    ]
    func wait(timeout!: Duration): Bool
    
    @!APILevel[
        since: "22"
    ]
    func waitUntil(predicate: () -> Bool): Unit
    
    @!APILevel[
        since: "22"
    ]
    func waitUntil(predicate: () -> Bool, timeout!: Duration): Bool
    
    @!APILevel[
        since: "22"
    ]
    func notify(): Unit
    
    @!APILevel[
        since: "22"
    ]
    func notifyAll(): Unit
}

@Deprecated[message: "Use `public interface Condition` instead."]
@!APILevel[
    since: "22"
]
public class Monitor <: ReentrantMutex {
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public init()
    
    /**
    * @throws IllegalSynchronizationStateException
    * @throws ArithmeticException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func wait(timeout!: Duration = Duration.Max): Bool
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func notify(): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func notifyAll(): Unit
}

@Deprecated[message: "Use `public interface Condition` instead."]
@!APILevel[
    since: "22"
]
public struct ConditionID {
}

@Deprecated[message: "Use `public class Mutex` instead."]
@!APILevel[
    since: "22"
]
public class MultiConditionMonitor <: ReentrantMutex {
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public init()
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func newCondition(): ConditionID
    
    /**
    * @throws ArithmeticException
    * @throws IllegalArgumentException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func wait(condID: ConditionID, timeout!: Duration = Duration.Max): Bool
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func notify(condID: ConditionID): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func notifyAll(condID: ConditionID): Unit
}

@!APILevel[
    since: "22"
]
public class Mutex <: UniqueLock {
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public func lock(): Unit
    
    @!APILevel[
        since: "22"
    ]
    public func tryLock(): Bool
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func unlock(): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func condition(): Condition
}

@!APILevel[
    since: "22"
]
public class ReadWriteLock {
    @!APILevel[
        since: "22"
    ]
    public prop readLock: Lock
    
    @!APILevel[
        since: "22"
    ]
    public prop writeLock: UniqueLock
    
    @!APILevel[
        since: "22"
    ]
    public init(fair!: Bool = false)
    
    @!APILevel[
        since: "22"
    ]
    public func isFair(): Bool
}

@Deprecated[message: "Use `public class Mutex` instead."]
@!APILevel[
    since: "22"
]
public open class ReentrantMutex <: Lock {
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public open func lock(): Unit
    
    @!APILevel[
        since: "22"
    ]
    public open func tryLock(): Bool
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public open func unlock(): Unit
}

@Deprecated
@!APILevel[
    since: "22"
]
public enum ReadWriteMutexMode {
    @!APILevel[
        since: "22"
    ]
    Unfair |
    @!APILevel[
        since: "22"
    ]
    Fair
}

@Deprecated[message: "Use `public class ReadWriteLock` instead."]
@!APILevel[
    since: "22"
]
public class ReentrantReadWriteMutex {
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public init(mode!: ReadWriteMutexMode = ReadWriteMutexMode.Unfair)
    
    @!APILevel[
        since: "22"
    ]
    public prop readMutex: ReentrantReadMutex
    
    @!APILevel[
        since: "22"
    ]
    public prop writeMutex: ReentrantWriteMutex
}

@Deprecated[message: "Use `public interface Lock` instead."]
@!APILevel[
    since: "22"
]
public class ReentrantReadMutex <: ReentrantMutex {
    /**
    * @throws IndexOutOfBoundsException
    * @throws Error
    * @throws NoneValueException
    * @throws IllegalArgumentException
    * @throws ArithmeticException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func lock(): Unit
    
    /**
    * @throws NoneValueException
    * @throws Error
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func tryLock(): Bool
    
    /**
    * @throws OutOfMemoryError
    * @throws IndexOutOfBoundsException
    * @throws Error
    * @throws NoneValueException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func unlock(): Unit
}

@Deprecated[message: "Use `public interface UniqueLock` instead."]
@!APILevel[
    since: "22"
]
public class ReentrantWriteMutex <: ReentrantMutex {
    /**
    * @throws IllegalArgumentException
    * @throws ArithmeticException
    * @throws IndexOutOfBoundsException
    * @throws NoneValueException
    * @throws Error
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func lock(): Unit
    
    /**
    * @throws Error
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func tryLock(): Bool
    
    /**
    * @throws Error
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func unlock(): Unit
}

@!APILevel[
    since: "22"
]
public class Semaphore {
    /**
    * @throws IllegalSynchronizationStateException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public init(count: Int64)
    
    @!APILevel[
        since: "22"
    ]
    public prop count: Int64
    
    /**
    * @throws ArithmeticException
    * @throws IllegalSynchronizationStateException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func acquire(amount!: Int64 = 1): Unit
    
    /**
    * @throws IllegalSynchronizationStateException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func tryAcquire(amount!: Int64 = 1): Bool
    
    /**
    * @throws IllegalSynchronizationStateException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func release(amount!: Int64 = 1): Unit
}

@!APILevel[
    since: "22"
]
public class SyncCounter {
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public init(count: Int64)
    
    @!APILevel[
        since: "22"
    ]
    public prop count: Int64
    
    /**
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func dec(): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws ArithmeticException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func waitUntilZero(timeout!: Duration = Duration.Max): Unit
}

@!APILevel[
    since: "22"
]
public class Timer <: Equatable<Timer> & Hashable {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    * @throws ArithmeticException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func after(delay: Duration, task: () -> Option<Duration>): Timer
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    * @throws ArithmeticException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func once(delay: Duration, task: () -> Unit): Timer
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    * @throws ArithmeticException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func repeat(delay: Duration, interval: Duration, task: () -> Unit, style!: CatchupStyle = Burst): Timer
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    * @throws ArithmeticException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func repeatDuring(period: Duration, delay: Duration, interval: Duration, task: () -> Unit,
        style!: CatchupStyle = Burst): Timer
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    * @throws ArithmeticException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func repeatTimes(count: Int64, delay: Duration, interval: Duration, task: () -> Unit,
        style!: CatchupStyle = Burst): Timer
    
    @!APILevel[
        since: "22"
    ]
    public func cancel(): Unit
    
    @!APILevel[
        since: "22"
    ]
    public operator func ==(rhs: Timer): Bool
    
    @!APILevel[
        since: "22"
    ]
    public operator func !=(rhs: Timer): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
}

@!APILevel[
    since: "22"
]
public enum CatchupStyle {
    @!APILevel[
        since: "22"
    ]
    Delay |
    @!APILevel[
        since: "22"
    ]
    Burst |
    @!APILevel[
        since: "22"
    ]
    Skip
}

